/******************************************************************************
	This file is a part of the Snapshot Bioinformatics Project

	Copyright (C) 2012-2013 Jarom Schow

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef EFETCH_H
#define EFETCH_H

#include "Entrez.h"

namespace Bio {

class BIO_EXPORT EFetch : public Entrez {
public:
	EFetch();
	EFetch( const QString &db, const QString &id );
	EFetch( const QString &db, const QStringList &ids );
	EFetch( const QString &db, int queryKey, const QString &webEnv );
	virtual ~EFetch();

	virtual bool	exec();

	void	setDatabase( const QString &db );
	QString	getDatabase() const;

	void		addID( const QString &id );
	void		setIDs( const QStringList &ids );
	QStringList	getIDs() const;

	void	setHistory( int queryKey, const QString &webEnv );
	int		getQueryKey() const;
	QString	getWebEnv() const;

//	void	setRetMode( RetMode type );
//	RetMode	getRetMode() const;

//	void	setRetType( RetType type );
//	RetType	getRetType() const;

	void	setRetStart( int num );
	int		getRetStart() const;

	void	setRetMax( int num );
	int		getRetMax() const;

	void	setStrand( int num );
	int		getStrand() const;

	void	setSeqStart( int num );
	int		getSeqStart() const;

	void	setSeqStop( int num );
	int		getSeqStop() const;

	void	setComplexity( int num );
	int		getComplexity() const;

private:
	QString		m_db;
	int			m_queryKey, m_strand, m_complexity;
	int			m_retStart, m_retMax, m_seqStart, m_seqStop;
	QString		m_webEnv;
	QStringList	m_ids;
};

}; // Bio

#endif // EFETCH_H